package Entity;

import java.awt.Component;
import javax.swing.JCheckBox;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author CONG
 */
public class TestRenderer extends JCheckBox implements TableCellRenderer {

    public TestRenderer() {
        super();
    }
    
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        setHorizontalAlignment(SwingConstants.CENTER);
        boolean bl=((Boolean)value).booleanValue();
        setSelected(bl);
        return this;
    }
    
}
